<template>
    <div
        class="ReissueCard"
        v-loading="pageLoading"
        element-loading-background="rgba(255, 255, 255, 0.7)"
    >
        <el-card class="box-card">
            <div slot="headerss" class="clearfix text_fl">
                <span>补/换卡</span>
                <el-button class="btn_close" type="text" @click="handleClose">关闭</el-button>
            </div>
            <div>
                <!-- <div class="tab-header text_center">
                    <div class="headerTitles">补卡</div>
                </div>-->
                <div v-show="!ReissueCardSuccess">
                    <el-form ref="formData" :model="formData" :rules="rules" label-width="150px">
                        <el-row>
                            <el-col :span="10" :offset="1">
                                <div class="text_center width30">
                                    <el-form-item label="账户类别:" class="text_fl">
                                        <el-select
                                            v-model="formData.CATEGORY"
                                            placeholder="请选择账户类别"
                                            @change="getCATEGORYObj"
                                            disabled
                                        >
                                            <el-option
                                                v-for="item in AccountionTYPE_INFO"
                                                :label="item.label"
                                                :value="item.code"
                                                :key="item.code"
                                            ></el-option>
                                        </el-select>
                                    </el-form-item>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="text_center width30">
                                    <el-form-item label="卡号:" class="text_fl">
                                        <el-select
                                            v-model.trim="formData.CARDNO"
                                            placeholder="请选择卡号"
                                            @change="getCARDNBRFun"
                                            disabled
                                        >
                                            <el-option
                                                v-for="item in cardList_option"
                                                :label="item.CARDNBR"
                                                :value="item.CARDNBR"
                                                :key="item.CARDNBR"
                                            ></el-option>
                                        </el-select>
                                    </el-form-item>
                                </div>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="10" :offset="1">
                                <div class="text_center width30">
                                    <el-form-item label="递卡方式:" class="text_fl" prop="REPLACEFEE">
                                        <el-select
                                            v-model="formData.REPLACEFEE"
                                            placeholder="请选择递卡方式"
                                            clearable
                                            @change="componentCostFun"
                                        >
                                            <el-option
                                                v-for="item in isREPLACEFEEOption"
                                                :label="item.label"
                                                :value="item.code"
                                                :key="item.label"
                                            ></el-option>
                                            <!-- <el-option
                                                v-for="item in isDSPCHCDOption"
                                                :label="item.label"
                                                :value="item.code"
                                                :key="item.label"
                                            ></el-option>-->
                                        </el-select>
                                    </el-form-item>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="text_center width30">
                                    <el-form-item label="凸字姓名(姓/名/):" class="text_fl">
                                        <el-input
                                            v-model="formData.EMBNAME"
                                            class="textSpan"
                                            placeholder=" 姓/名/"
                                        ></el-input>
                                    </el-form-item>
                                </div>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="10" :offset="1">
                                <div class="text_center width30">
                                    <el-form-item label="补卡费用:" class="text_fl">
                                        <el-input :disabled="true" v-model.trim="COST_value"></el-input>
                                    </el-form-item>
                                    <!-- <el-select
                                            v-model="formData.REPLACEFEE"
                                            placeholder="请选择补卡费用"
                                            clearable
                                        >
                                            <el-option
                                                v-for="item in isREPLACEFEEOption"
                                                :label="item.label"
                                                :value="item.code"
                                                :key="item.label"
                                            ></el-option>
                                    </el-select>-->
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="text_center width30">
                                    <el-form-item label="卡片递送地址类型:" class="text_fl">
                                        <el-select
                                            v-model="formData.CARDTO"
                                            placeholder="请选择递卡地址类型"
                                            disabled
                                        >
                                            <el-option
                                                v-for="item in isCARDTOOption"
                                                :label="item.label"
                                                :value="item.code"
                                                :key="item.label"
                                            ></el-option>
                                        </el-select>
                                    </el-form-item>
                                </div>
                            </el-col>
                            <!-- <el-col :span="12">
                                <div class="text_center width30">
                                    <el-form-item label="递送费用:" class="text_fl" prop="COURIERFEE">
                                        <el-select
                                            v-model="formData.COURIERFEE"
                                            placeholder="请选择递送费用"
                                            clearable
                                        >
                                            <el-option
                                                v-for="item in isCOURIERFEEOption"
                                                :label="item.label"
                                                :value="item.code"
                                                :key="item.label"
                                            ></el-option>
                                        </el-select>
                                    </el-form-item>
                                </div>
                            </el-col>-->
                        </el-row>
                        <el-row>
                            <el-col :span="10" :offset="1">
                                <div class="text_center width30">
                                    <el-form-item label="补卡换卡次数:" class="text_fl">
                                        <el-input :disabled="true" v-model="formData.ISSUENBR"></el-input>
                                    </el-form-item>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="text_center width30">
                                    <el-form-item label="电子现金余额:" class="text_fl">
                                        <el-input :disabled="true" v-model="BALANCE_value"></el-input>
                                    </el-form-item>
                                </div>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="10" :offset="1">
                                <div class="text_center width30">
                                    <el-form-item label="是否绑定ETC:" class="text_fl">
                                        <span class="el-form-item-span"></span>
                                    </el-form-item>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="text_center width30">
                                    <el-form-item label="是否保号换卡:" class="text_fl">
                                        <el-select
                                            v-model="formData.KEEPYN"
                                            clearable
                                            :disabled="true"
                                        >
                                            <el-option
                                                v-for="item in yesOrNo"
                                                :label="item.label"
                                                :value="item.code"
                                                :key="item.label"
                                            ></el-option>
                                        </el-select>
                                    </el-form-item>
                                </div>
                            </el-col>
                        </el-row>
                        <el-row v-show="formData.REPLACEFEE==='2'">
                            <el-col :span="10" :offset="1">
                                <div class="text_center width30">
                                    <el-form-item label="是否为二次投递:" class="text_fl">
                                        <el-radio-group v-model="IFFIRST">
                                            <el-radio label="1">是</el-radio>
                                            <el-radio label="0">否</el-radio>
                                        </el-radio-group>
                                    </el-form-item>
                                </div>
                            </el-col>
                            <el-col :span="12"></el-col>
                        </el-row>
                        <!-- 话术 -->
                        <div class="hstable_wrap" v-if="speechList.length!=0">
                            <el-table
                                :data="speechList"
                                border
                                stripe
                                header-row-class-name="headerRow"
                                ref="showListTable"
                                class="heard-bg business_table hstable"
                                @selection-change="handleSelectionChange"
                            >
                                <el-table-column type="selection" label=" " min-width="55"></el-table-column>
                                <el-table-column label="业务话术">
                                    <template slot-scope="scope">{{scope.row.content}}</template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div class="text_center" style="margin-bottom:20px;">
                            <el-button
                                type="primary"
                                size="small"
                                @click.native="submitFormReissueCard"
                                icon="el-icon-circle-check"
                            >确定</el-button>
                            <el-button
                                type="primary"
                                size="small"
                                @click.native="addressEdit"
                            >客户地址信息修改</el-button>
                        </div>
                    </el-form>
                    <el-dialog
                        v-drag
                        title="补卡"
                        :visible.sync="centerDialogVisible"
                        width="500px"
                        :append-to-body="true"
                        top="30vh"
                        :close-on-click-modal="false"
                        center
                    >
                        <p>
                            卡号：
                            <span>{{this.formData.CARDNO}}</span>
                        </p>
                        <p>
                            卡产品：
                            <span>{{this.PRODUCT_value}}</span>
                        </p>
                        <p>
                            寄送方式：
                            <span>{{this.formData.REPLACEFEE|getsendtp}}</span>
                        </p>
                        <p>
                            收费标准：
                            <span>{{this.COST_value}}</span>
                        </p>
                        <p>
                            寄送地址：
                            <span>{{this.formData.CARDTO|getaddresstp}}</span>
                        </p>
                        <p>
                            电子现金余额：
                            <span>{{this.BALANCE_value}}</span>
                        </p>
                        <!-- <p>
                            是否绑定ETC：
                            <span>{{this.ETCSTATUS_value?'是':'否'}}</span>
                        </p>-->
                        <p class="text_center padding_top15">
                            <span style="color:#3a8ee6; ">您确定对该卡号进行补卡操作？</span>
                        </p>
                        <span slot="footer" class="dialog-footer">
                            <el-button
                                size="small"
                                icon="el-icon-circle-close"
                                @click="centerDialogVisible = false"
                            >取 消</el-button>
                            <el-button
                                type="primary"
                                size="small"
                                @click="handerCardReissue"
                                icon="el-icon-circle-check"
                            >确定</el-button>
                        </span>
                    </el-dialog>
                </div>
                <div v-show="ReissueCardSuccess">
                    <reissue-card-item
                        v-if="ReissueCardSuccess"
                        :ReissueCardSuccess="ReissueCardSuccess"
                    ></reissue-card-item>
                </div>
            </div>
        </el-card>
    </div>
</template>

<script>
import { mapGetters } from 'vuex';
import ReissueCardItem from './childItem/ReissueCardItem.vue';
import {
    closePage,
    getDictSelectList,
    itoStr,
    getDictMappingValue,
    componentCost,
    setICCardInfo,
    setETCCardInfo,
    updateDeal3004,
    getCardInfo3004,
    updateDeal3601, getBusinessMenuId
} from '@/utils/Common';
export default {
    name: 'ReissueCard',
    data() {
        return {
            formData: {
                EMBNAME: '',
                // DESPATCH:'POST',//预定递送方式或递送方式
                CARDTO: '',
                COURFEE: '2', // 递送费用代码  默认给外地的值 2
                DSPCHCD: 'COUR', // this.newCardInfo_3004.DESPATCH,//递卡方式
                ISSRSN: 'P', // 换卡原因
                CHECKFLG: '000000000000000', // 检查项目选择
                CDFRM: 'A', // 卡片版面  必填字段 可以给四个空格
                PINREQD: '0', // 是否产生PIN 1:不产生PIN 0:产生PIN
                KEEPYN: '0', // 换卡保留卡号选项 0不保留卡号
                CDISSFLAG: '0', // 即时制卡 0：否（默认）1：是
                PINFLAG: this.pinFlag,
                REPFEE: '',//换卡费用代码
            },
            isDSPCHCDOption: [], // 递卡方式 isDESPATCHOption DSPCHCD
            isCARDTOOption: [], // 卡片递送地址类型
            isREPLACEFEEOption: [], // 换卡费用代码选项
            // isCOURIERFEEOption: [], // 递送费用代码选项
            ReissueCardSuccess: '', // 补卡成功后的信息
            centerDialogVisible: false, // 弹框是否显示
            PRODUCT_value: '', // //卡产品 在数据字典里的值
            CATEGORY_filter: '',
            productId: '',
            EMBNAME_filter: '', // 凸字姓名
            rules: {
                //EMBNAME: [{ required: true, message: '凸字姓名不能为空！', trigger: 'blur' }],
                DSPCHCD: [{ required: true, message: '递卡方式不能为空！', trigger: 'change' }],
                // CARDTO: [
                //     { required: true, message: '卡片递送地址类型不能为空！', trigger: 'change' },
                //     // {type:'string',message:'卡片递送地址类型为字符串',whitespace:true}
                // ],
                COURIERFEE: [{ required: true, message: '递送费用不能为空！', trigger: 'change' }],
                REPLACEFEE: [{ required: true, message: '补卡费用不能为空！', trigger: 'change' }],
            },
            Card_STAT: '',
            pageLoading: false,
            COST_value: '0',//补卡费用 单纯用来展示 计算后的补卡费用
            BALANCE_value: '0',//电子现金余额  3096的BALANCE 值
            ETCSTATUS_value: false,//3134ETC签约关系查询交易接口
            cardtype: '',//补卡费用代码
            PRODUCT: '',//卡片产品编号
            newCardInfo_3004: '',//每次换卡的默认卡信息
            cardList_option: '',//当前账户下的所有的卡
            yesOrNo: [],//是否保号换卡
            IFFIRST: '',//是否二次投递
            speechList: [],//话术列表
            selectedList: [],
            MenuId: '',
        };
    },
    filters: {
        getsendtp: (value) => {
            const val = (`${value}`).trim();
            if (val === '0') {
                return '免费';
            } if (val === '1') {
                return '普通';
            }
            if (val === '2') {
                return '加急';
            }
            return val;
        },
        getaddresstp: (value) => {
            value = (`${value}`).trim();
            if (value === 'B') {
                return '公司地址';
            } if (value === 'H') {
                return '家庭地址';
            }
            return value;
        },
    },
    components: {
        ReissueCardItem,
    },
    computed: {
        ...mapGetters([
            'cardInfo_3004',
            'customerAdressInfo_3003',
            'AccountionTYPE_INFO',
            'cardList_3601',
            'defaultParams',
            'pinFlag',
            'isCurrentMenuInfo',
            'businessMenu',
        ]),

        // EMBNAME_filter() {
        //     return this.disPoseName(this.formData.EMBNAME);
        // },
    },

    async mounted() {
        this.MenuId = this.$route.params.id || '';
        this.setDefaultCardInfo();
        this.getviewInit();
        // dspchcd cardto
        this.getDictInfovalue();
        this.getCATEGORYLabel();
        //  this.isREPLACEFEEOption=this.getDictInfo("COURFEE");
        //  this.isCOURIERFEEOption=this.getDictInfo("REPFEE");
        // 3096IC卡交易明细查询
        setICCardInfo(this.formData.CARDNO, this);
        // 3134ETC签约关系查询交易接口
        //setETCCardInfo(this.formData.CARDNO, this);
        this.yesOrNo = await getDictSelectList('yesOrNo', this);
        await this.getspeechList();
    },

    methods: {
        // 修改默认交易
        setDefaultCardInfo() {
            // 这个方法只会调用一次
            this.pageLoading = true;
            if (!this.newCardInfo_3004) {
                this.newCardInfo_3004 = JSON.parse(JSON.stringify(this.cardInfo_3004));
            };
        },
        // 获取账户类型
        getCATEGORYObj(val) {
            console.log('val', val);
            // 获取账户类型
            this.AccountionTYPE_INFO.some(async (item) => {
                if (item.code === val) {
                    this.CATEGORY_filter = item.label;
                    return true
                }
            });
            console.log('this.CATEGORY_filter', this.CATEGORY_filter);
            //获取当前账户类型下 所有的卡 
            this.getCardListOption(val);

        },
        //获取当前账户类型下 所有的卡 
        getCardListOption(CATEGORY_val) {
            this.cardList_option = this.cardList_3601.filter((item) => (item.CATEGORY + '').trim() === CATEGORY_val);
            console.log(" this.cardList_option ", this.cardList_option);
            if (this.cardInfo_3004.CATEGORY + '' === CATEGORY_val) {
                this.formData.CARDNO = this.cardInfo_3004.CARDNO;  // 卡号
                console.log('this.formData.CARDNO', this.formData.CARDNO);
            } else {
                this.formData.CARDNO = '';
            }
        },
        // 选择 选中的需要操作的卡 后
        async getCARDNBRFun(cardNo) {
            // 选中 需要操作的卡后 需要重新跑 3004接口
            console.log("cardNo", cardNo);
            this.formData.CARDNO = cardNo;
            this.cardList_3601.forEach((item) => {
                if (item.CARDNBR + '' === this.formData.CARDNO) {

                    console.log("this.item", item);
                    if (item.PRODUCT + '' === '46') {
                        this.formData.KEEPYN = '1';
                    } else {
                        this.formData.KEEPYN = '0';
                    }
                }
            });
            // 选中 需要操作的卡后 需要重新跑 3004接口
            console.log("cardNo", cardNo);
            this.formData.CARDNO = cardNo;
            // 更新 newCardInfo_3004 里的值
            await getCardInfo3004(cardNo, this);
            this.getNew3004();
        },
        async getNew3004() {
            this.formData.OPENDATE = this.newCardInfo_3004.OPENDATE || '';// 开卡日期
            this.formData.CARDSTAT = this.newCardInfo_3004.CARDSTAT || '';// 卡片状态
            this.formData.CARDNO = this.newCardInfo_3004.CARDNO || '';// 卡号
            this.formData.CARDNBR = this.newCardInfo_3004.CARDNO; // 卡号
            this.formData.CATEGORY = this.newCardInfo_3004.CATEGORY + '' || '';//账户类别
            this.formData.EMBNAME = this.disPoseName(this.newCardInfo_3004.EMBNAME); // 凸字姓名
            this.formData.ISSUENBR = this.newCardInfo_3004.ISSUENBR;// 换卡次数
            this.formData.REPFEE = this.newCardInfo_3004.REPLACEFEE; // 换卡费用代码

            this.Card_STAT = (this.newCardInfo_3004.CARDSTAT + '').trim();
            this.productId = this.newCardInfo_3004.PRODUCT;
            this.PRODUCT = (this.newCardInfo_3004.PRODUCT + '').trim();
            this.PRODUCT_value = await getDictMappingValue('PRODUCT', this.newCardInfo_3004.PRODUCT, this);

            //发卡模式，是否为网申卡，提示‘该信用卡为网申卡，请注意出工单维护客户信息’
            console.log("发卡模式：", this.newCardInfo_3004.ISSMOD);
            if (this.newCardInfo_3004.ISSMOD === '01') {
                this.$alert(
                    `该信用卡为网申卡，请注意出工单维护客户信息`,
                    '补卡提示',
                    { customClass: 'warning', type: 'warning', showClose: false },
                ).then(() => {

                });
            }

            if (this.newCardInfo_3004.VCNSTS.trim() === 'A') {
                this.$alert(
                    "请注意，该卡片为虚拟卡！",
                    '补卡提示',
                    { customClass: 'warning', type: 'warning', showClose: false },
                ).then(() => {
                    // closePage(this.$route, this, 1);
                });
            };

        },
        getviewInit() {
            this.pageLoading = true;
            this.formData.CARDTO = `${this.customerAdressInfo_3003.STSMAIL.trim()}`, // /卡片递送地址类型, // /卡片递送地址类型
                this.getNew3004();

            this.getCardListOption(this.formData.CATEGORY);


            this.cardList_3601.forEach((item) => {
                if (item.CARDNBR + '' === this.formData.CARDNO) {

                    console.log("this.item", item);
                    if (item.PRODUCT + '' === '46') {
                        this.formData.KEEPYN = '1';
                    } else {
                        this.formData.KEEPYN = '0';
                    }
                }
            });

        },
        //根据菜单id查询话术列表
        async getspeechList() {
            console.log("this.isCurrentMenuInfo.id", this.isCurrentMenuInfo.id);
            var checkParam = {
                'id': this.MenuId || this.isCurrentMenuInfo.id,
            };
            this.$post.busiMenu.getlistByMenuId(checkParam).then((res) => {
                console.log("话术查询结果：", res);
                if (res.status === 200) { // http通讯成功
                    if (res.data.status == 0) { // 业务请求成功
                        this.speechList = res.data.content;
                    }
                }
            });
        },
        handleSelectionChange(val) {
            this.selectedList = val;
        },
        // updated3004() {

        // },
        // 请求数据字典里的字段
        async getDictInfovalue() {
            this.isDSPCHCDOption = await getDictSelectList('DSPCHCD', this);
            // 寄送地址类型
            this.isCARDTOOption = await getDictSelectList('MAILINGADDRESS', this);
            // 补卡费用代码
            this.cardtype = await getDictSelectList('CARDTYPE', this);
            // 
            this.isREPLACEFEEOption = await getDictSelectList('REPFEE', this);
            // this.isCOURIERFEEOption = await getDictSelectList('COURFEE', this);
            // this.CATEGORY_filter = await getDictMappingValue('CATE', this.cardInfo_3004.CATEGORY, this);
            this.getExecuteFun();
            // this.formData.EMBNAME_filter = this.disPoseName(this.formData.EMBNAME);
            this.pageLoading = false;

        },
        // 获取账户类别label
        getCATEGORYLabel() {
            this.AccountionTYPE_INFO.filter((item) => {
                console.log('item_filter', item.code);
                if (item.code === this.formData.CATEGORY) {
                    this.CATEGORY_filter = item.label;
                    return false
                }
            })
        },
        async getExecuteFun() {
            this.productId = itoStr(this.newCardInfo_3004.PRODUCT, 4);
            // if (this.productId === '0046') {
            //     this.$alert(
            //         `此卡为: ${this.PRODUCT_value}\n补卡功能锁定，跳转至保号换卡工单界面申请！`,
            //         '补卡提示',
            //         { customClass: 'warning', type: 'warning', showClose: false },
            //     ).then(() => {
            //         closePage(this.$route, this, 1);
            //     });
            // }
            if (this.Card_STAT === 'H' || this.Card_STAT === "O") {
                // 判断当前卡的可用额度和信用额度是否相等
                if (this.newCardInfo_3004.CRDLIMT !== this.newCardInfo_3004.AVLIMT) {
                    this.$alert(
                        `当前客户有欠款，请还款后再致电补卡`,
                        '补卡提示',
                        { customClass: 'warning', type: 'warning', showClose: false },
                    ).then(() => {
                        closePage(this.$route, this, 1);
                    });
                }
            } else if (this.Card_STAT === 'U') {
                this.$alert(
                    `当前卡片为睡眠卡，请先转为未激活状态，再进行换卡操作`,
                    '补卡提示',
                    { customClass: 'warning', type: 'warning', showClose: false },
                ).then(() => {
                    closePage(this.$route, this, 1);
                });
            };
        },

        // 开始补卡
        handerCardReissue() {
            this.setsubmitForm();
            this.centerDialogVisible = false;
        },
        // 从数据字典里查  产品编号对应的文字
        submitFormReissueCard() {
            console.log("this.formData.REPLACEFEE", this.formData.REPLACEFEE);
            if (this.formData.REPLACEFEE + '' === '2') {
                if (this.IFFIRST + '' === '') {
                    this.$alert(
                        '请确认并选择是否二次投递',
                        '补/换卡提示',
                        { customClass: 'warning', type: 'warning' },
                    );
                    return;
                } else if (this.IFFIRST + '' === '1') {
                    //二次投递，公务卡、个人商务卡39、徽农卡67、其他（就是之前提供的补卡费用的最下面四类卡种）点击补卡按钮提示“该卡种二次投递加急请出具工单”
                    console.log("this.COST_value", this.COST_value);
                    if (this.COST_value != '0') {
                        this.$alert(
                            '该卡种二次投递加急请出具工单',
                            '补/换卡提示',
                            { customClass: 'warning', type: 'warning' },
                        );
                        return;
                    }
                } else if (this.IFFIRST + '' === '0') {
                    //不是二次投递，公务卡32|31|36|9103、个人商务卡39、徽农卡67点击补卡按钮提示“该卡种加急补卡请出具工单”
                    if (this.PRODUCT + '' === '31' || this.PRODUCT + '' === '32' || this.PRODUCT + '' === '36' || this.PRODUCT + '' === '39' || this.PRODUCT + '' === '67' || this.PRODUCT + '' === '9103') {
                        this.$alert(
                            '该卡种加急补卡请出具工单',
                            '补/换卡提示',
                            { customClass: 'warning', type: 'warning' },
                        );
                        return;
                    }
                }
            }
            this.$refs.formData.validate((valid) => {
                if (valid) {
                    console.log("this.selectedList.length", this.selectedList.length);
                    if (this.selectedList.length != this.speechList.length) {
                        this.$alert('话术尚未全部勾选！', '提示', {
                            customClass: 'warning', type: 'warning',
                        });
                        return;
                    }
                    this.centerDialogVisible = true;
                }
            });
        },
        // 处理 凸字姓名
        // name 凸字姓名  number 截取位数
        disPoseName(name) {
            const number = this.newCardInfo_3004.EMBOSSSUL;
            const number2 = this.newCardInfo_3004.EMBOSSSUR;
            let nameValue = '';
            nameValue = name.substring(0, number - 1);
            nameValue = `${nameValue}/${name.substring(number - 1, number2)}`;
            nameValue = `${nameValue}/${name.substring(number2)}`;
            nameValue && (nameValue = (`${nameValue}`).trim());
            return nameValue;
        },
        // 下拉选 递卡方式 触发事件
        componentCostFun(val) {
            this.formData.REPFEE = val;
            // 计算 递送费用  修改 COST_value 的值 上送到 页面上
            componentCost(val, this);
        },
        // 发送请求 开始补卡
        setsubmitForm() {

            const defaultParams = JSON.parse(JSON.stringify(this.defaultParams));
            defaultParams.body.appBody = Object.assign(this.defaultParams.body.appBody, this.formData);
            defaultParams.body.appHead.tranCode = '4025';// 修改交易号
            console.log(defaultParams);
            this.$post.common.transPort(defaultParams).then((res) => {
                if (res.status === 200) { // 请求成功
                    const cardlossofs = JSON.parse(res.data.jsonRes);
                    if (cardlossofs.sysHead.rspCd == '000000') { // 交易成功
                        console.log(cardlossofs, 'cardlossofs');
                        this.ReissueCardSuccess = cardlossofs;
                        this.ReissueCardSuccess.CATEGORY_filter = this.CATEGORY_filter;
                        this.ReissueCardSuccess.CARDNO = this.formData.CARDNO;
                        if (this.newCardInfo_3004.CARDNO === this.cardInfo_3004.CARDNO) {
                            updateDeal3004(this.newCardInfo_3004.CARDNO, this);
                        }
                        updateDeal3601(this.newCardInfo_3004.CARDNO, this.newCardInfo_3004.KEYTYPE, this.newCardInfo_3004.CUSTID, this);
                    } else {
                        const ErrorMessage = `错误码：${cardlossofs.sysHead.rspCd} ` + `错误信息：${cardlossofs.sysHead.rspMsg}`;
                        this.$alert(ErrorMessage, cardlossofs.sysHead.busiName, { customClass: 'error', type: 'error' });
                    }
                }
                this.centerDialogVisible = false; // 关闭弹框
            });
        },

        addressEdit() {
            this.MenuId = getBusinessMenuId('/customerInfomationChange/customerInfoChange', this.businessMenu);
            console.log('this.MenuId____', this.MenuId);
            this.$router.push({ name: 'customerInfoChange', path: '/customerInfomationChange/customerInfoChange', params: { id: this.MenuId } });
        },
        // 点击关闭
        handleClose() {
            closePage(this.$route, this, 1);
        },
    },
};
</script>

<style lang='scss' >
.ReissueCard {
    /* .el-form-item-span {
        background-color: #f5f7fa;
        border-color: #e4e7ed;
        color: #606266;
        cursor: not-allowed;
        width: 250px;
        min-width: 200px;
        height: 35px;
        line-height: 35px;
        display: inline-block;
        background-image: none;
        border-radius: 4px;
        border: 1px solid #dcdfe6;
        box-sizing: border-box;
        padding: 0 15px;
    } */
    .el-card__header {
        padding: 8px !important;
    }
    .el-form-item__content {
        text-align: left;
        .el-radio-group {
            display: inline-block;
            line-height: 1;
            vertical-align: text-bottom;
            .el-radio {
                margin-top: 10px;
                margin-right: 10px;
            }
        }
    }
    .el-form-item-input input,
    .textSpan {
        width: 250px;
    }
    .el-dialog__body p {
        text-align: left;
        padding-left: 30%;
        margin: 8px 5px;
        span {
            color: #3a8ee6;
        }
    }
    .el-card.is-always-shadow {
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    .el-card {
        border: none;
    }
}
</style>
